package com.javaex.book.utils;

import com.javaex.book.utils.Constants.Response;

/**
 * 页面路径
 *
 * @author 黄星琦
 * @Date 2022年2月14日
 */
public class Pages {

	public static final String INDEX = "/index.jsp";
	
	public static final String NOT_FOUND = "/pages/error/404.jsp";
	public static final String SERVET_ERROR = "/pages/error/500.jsp";
	
	public static final String LOGIN_OR_REGISTER = "/pages/user/login.jsp";
	public static final String USER_MANAGER = "/pages/user/user.jsp";
	public static final String USER_EDIT = "/pages/user/user_edit.jsp";
	
	public static final String BOOK_MANAGER = "/pages/book/book_manager.jsp";
	public static final String BOOK_EDIT = "/pages/book/book_edit.jsp";
	
	public static final String MANAGER = "/pages/manager/manager.jsp";
	
	public static final String CART = "/pages/cart/cart.jsp";
	
	public static final String ORDER_CREATE = "/pages/order/order_create.jsp";
	public static final String ORDER_MANAGER = "/pages/order/order.jsp";
	public static final String ORDER_DETAIL = "/pages/order/order_detail.jsp";
	
	/**
	 * 重定向
	 * @param url 重定向路径
	 * @return "redirect url" 格式的字符串
	 */
	public static String redirect(String url) {
		return Response.REDIRECT + " " + url;
	}
}
